﻿using parkMonitor.language;
using parkMonitor.model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace parkMonitor.viewModel.objectTree {
	/// <summary>部件树ViewModel</summary>
	public class ObjectTreeVM : ObservableCollection<ObjectTreeRootVM> {

		public ObjectTreeVM() {
			webServer = new ObjectTreeRootVM() { Name = Language.ins.webServer, DevType = DeviceType.WebServer };
			webServer.Add(webServerItem);
			numMachine = new ObjectTreeRootVM() { Name = Language.ins.numMachine, DevType = DeviceType.NumMachine };

			Add(webServer);
			Add(numMachine);
		}

		//web服务器
		public ObjectItemVM webServerItem = new ObjectItemVM() { Name = Language.ins.webServer, ShortInfo = Language.ins.offline, DevType = DeviceType.WebServer, UiType= DevTreeItemShowType.Image, ImgType= DeviceType.WebServer, ObjStatus = ComInfoStatus.Offline, OverInfo = Language.ins.webServer };
		//ObjectTreeRootVM _webServer = new ObjectTreeRootVM() { Name = Language.ins.webServer, DevType = DeviceType.WebServer, lstData = new ObservableCollection<object>() { }
		//};
		ObjectTreeRootVM webServer { get; set; }

		//号牌机
		//ObjectTreeRootVM _numMachine = new ObjectTreeRootVM() { Name = Language.ins.numMachine, DevType = DeviceType.NumMachine };
		public ObjectTreeRootVM numMachine { get; private set; }

		////车辆
		//ObjectTreeRootVM _carObject = new ObjectTreeRootVM() { Name = Language.ins.car, DevType = DeviceType.Car };
		//public ObjectTreeRootVM carObject { get { return  _carObject; }}

		////其他物体
		//ObjectTreeRootVM _ortherObject = new ObjectTreeRootVM() { Name = Language.ins.ortherObject, DevType = DeviceType.OrtherObject };
		//public ObjectTreeRootVM ortherObject { get { return _ortherObject; } }
	}
	
}
